
{{ 'section-multicolumn.css' | asset_url | stylesheet_tag }}
<link rel="stylesheet" href="{{ 'component-slider.css' | asset_url }}" media="print" onload="this.media='all'">
<noscript>{{ 'component-slider.css' | asset_url | stylesheet_tag }}</noscript>

<div class="multicolumn-review">
    <div class="multicolumn-home">
        <div class="multicolumn background-{{ section.settings.background_style }}{% if section.settings.title == blank %} no-heading{% endif %}">
            <div class="page-width">
              <div class="title-wrapper-with-link title-wrapper--self-padded-mobile{% if section.settings.title == blank %} title-wrapper-with-link--no-heading{% endif %}">
                <h2 class="title">
                  <span>{{ section.settings.title | escape }}</span>
                </h2>
              </div>
              <div class="desCon">
                {{ section.settings.text }}
              </div>
              <div class="swiper-father">
              <slider-component class="slider-mobile-gutter multicolumn-review-swiper swiper-container">
                <ul class="swiper-wrapper multicolumn-list grid"
                  id="Slider-{{ section.id }}"
                  role="list"
                >
                  {%- liquid
                    assign highest_ratio = 0
                    for block in section.blocks
                      if block.settings.image.aspect_ratio > highest_ratio
                        assign highest_ratio = block.settings.image.aspect_ratio
                      endif
                    endfor
                  -%}
                  {%- for block in section.blocks -%}
                     {% if localization.country.iso_code == 'US' %}
                      {%- case block.type -%}
                      {% when 'column_us' %}
                        <li class="column_us swiper-slide multicolumn-list__item" {{ block.shopify_attributes }}>
                          <div class="multicolumn-card">
                            {%- if block.settings.image != blank -%}
                              {% if section.settings.image_ratio == 'adapt' or section.settings.image_ratio == 'circle' %}
                                {% assign spaced_image = true %}
                              {% endif %}
                              <div class="multicolumn-card__image-wrapper multicolumn-card__image-wrapper--{{ section.settings.image_width }}-width{% if section.settings.image_width != 'full' or spaced_image %} multicolumn-card-spacing{% endif %}">
                                <div class="media--transparent media--{{ section.settings.image_ratio }}">
                                  <img
                                    srcset="{%- if block.settings.image.width >= 275 -%}{{ block.settings.image | img_url: '275x' }} 275w,{%- endif -%}
                                      {%- if block.settings.image.width >= 550 -%}{{ block.settings.image | img_url: '550x' }} 550w,{%- endif -%}
                                      {%- if block.settings.image.width >= 710 -%}{{ block.settings.image | img_url: '710x' }} 710w,{%- endif -%}
                                      {%- if block.settings.image.width >= 1420 -%}{{ block.settings.image | img_url: '1420x' }} 1420w,{%- endif -%}"
                                    src="{{ block.settings.image | img_url: '550x' }}"
                                    sizes="(min-width: 990px) {% if section.blocks.size <= 2 %}710px{% else %}550px{% endif %},
                                      (min-width: 750px) {% if section.blocks.size == 1 %}710px{% else %}550px{% endif %},
                                      calc(100vw - 30px)"
                                    alt="{{ block.settings.image.alt }}"
                                    height="{{ block.settings.image.height }}"
                                    width="{{ block.settings.image.width }}"
                                    loading="lazy"
                                  >
                                </div>
                              </div>
                            {%- endif -%}
  
                            <div class="review-icon">
                              {%- if block.settings.html != blank -%}
                              <span>{{ block.settings.html }}</span>
                              {% endif %}
                            </div>
                            <div class="multicolumn-card__info">
                            
                              {%- if block.settings.text != blank -%}
                                <div class="rte">{{ block.settings.text }}</div>
                              {%- endif -%}
  
                              {%- if block.settings.des != blank -%}
                              <div class="des">{{ block.settings.des }}</div>
                            {%- endif -%}
                            
                            
                              <div class="time">
                                {%- if block.settings.button_label != blank -%}
                                <div class="button-review font-contact">
                                  {%- if block.settings.button_link != blank -%}
                                  <a target="_blank" class="review-button"{% if block.settings.button_link == blank %} aria-disabled="true"  role="link"{% else %} href="{{ block.settings.button_link }}"{% endif %}>
                                  {{ block.settings.button_label | escape }}
                                </a>
                                {%- else-%}
                                {{ block.settings.button_label }}
                                {%- endif-%}
                              </div>
                            {%- endif-%}
                            {%- if block.settings.button_label2 != blank -%}
                            <div class="button-review font-contact">
                              <a target="_blank" class="review-button"{% if block.settings.button_link2 == blank %} aria-disabled="true"  role="link"{% else %} href="{{ block.settings.button_link2 }}"{% endif %}>
                              {{ block.settings.button_label2 | escape }}
                            </a>
                          </div>
                        {%- endif-%}
                                {%- if block.settings.button_label3 != blank -%}
                            <div class="button-review font-contact">
                              <a target="_blank" class="review-button"{% if block.settings.button_link3 == blank %} aria-disabled="true"  role="link"{% else %} href="{{ block.settings.button_link3 }}"{% endif %}>
                              {{ block.settings.button_label3 | escape }}
                            </a>
                          </div>
                        {%- endif-%}
                              </div>
                          
        
                            </div>
                          </div>
                        </li>
                      {% endcase %}
                      {% endif %}
                      {%- case block.type -%}
                      {% when 'column' %}
                        <li class="swiper-slide multicolumn-list__item" {{ block.shopify_attributes }}>
                          <div class="multicolumn-card">
                            {%- if block.settings.image != blank -%}
                              {% if section.settings.image_ratio == 'adapt' or section.settings.image_ratio == 'circle' %}
                                {% assign spaced_image = true %}
                              {% endif %}
                              <div class="multicolumn-card__image-wrapper multicolumn-card__image-wrapper--{{ section.settings.image_width }}-width{% if section.settings.image_width != 'full' or spaced_image %} multicolumn-card-spacing{% endif %}">
                                <div class="media--transparent media--{{ section.settings.image_ratio }}">
                                  <img
                                    srcset="{%- if block.settings.image.width >= 275 -%}{{ block.settings.image | img_url: '275x' }} 275w,{%- endif -%}
                                      {%- if block.settings.image.width >= 550 -%}{{ block.settings.image | img_url: '550x' }} 550w,{%- endif -%}
                                      {%- if block.settings.image.width >= 710 -%}{{ block.settings.image | img_url: '710x' }} 710w,{%- endif -%}
                                      {%- if block.settings.image.width >= 1420 -%}{{ block.settings.image | img_url: '1420x' }} 1420w,{%- endif -%}"
                                    src="{{ block.settings.image | img_url: '550x' }}"
                                    sizes="(min-width: 990px) {% if section.blocks.size <= 2 %}710px{% else %}550px{% endif %},
                                      (min-width: 750px) {% if section.blocks.size == 1 %}710px{% else %}550px{% endif %},
                                      calc(100vw - 30px)"
                                    alt="{{ block.settings.image.alt }}"
                                    height="{{ block.settings.image.height }}"
                                    width="{{ block.settings.image.width }}"
                                    loading="lazy"
                                  >
                                </div>
                              </div>
                            {%- endif -%}
  
                            <div class="review-icon">
                              {%- if block.settings.html != blank -%}
                              <span>{{ block.settings.html }}</span>
                              {% endif %}
                            </div>
                            <div class="multicolumn-card__info">
                            
                              {%- if block.settings.text != blank -%}
                                <div class="rte">{{ block.settings.text }}</div>
                              {%- endif -%}
  
                              {%- if block.settings.des != blank -%}
                              <div class="des">{{ block.settings.des }}</div>
                            {%- endif -%}
                            
                            
                              <div class="time">
                                {%- if block.settings.button_label != blank -%}
                                <div class="button-review font-contact">
                                  {%- if block.settings.button_link != blank -%}
                                  <a target="_blank" class="review-button"{% if block.settings.button_link == blank %} aria-disabled="true"  role="link"{% else %} href="{{ block.settings.button_link }}"{% endif %}>
                                  {{ block.settings.button_label | escape }}
                                </a>
                                {%- else-%}
                                {{ block.settings.button_label }}
                                {%- endif-%}
                              </div>
                            {%- endif-%}
                            {%- if block.settings.button_label2 != blank -%}
                            <div class="button-review font-contact">
                              <a target="_blank" class="review-button"{% if block.settings.button_link2 == blank %} aria-disabled="true"  role="link"{% else %} href="{{ block.settings.button_link2 }}"{% endif %}>
                              {{ block.settings.button_label2 | escape }}
                            </a>
                          </div>
                        {%- endif-%}
                                {%- if block.settings.button_label3 != blank -%}
                            <div class="button-review font-contact">
                              <a target="_blank" class="review-button"{% if block.settings.button_link3 == blank %} aria-disabled="true"  role="link"{% else %} href="{{ block.settings.button_link3 }}"{% endif %}>
                              {{ block.settings.button_label3 | escape }}
                            </a>
                          </div>
                        {%- endif-%}
                              </div>
                          
        
                            </div>
                          </div>
                        </li>   
                      {% endcase %}            
                  {%- endfor -%}
                </ul>
         

        
              </slider-component>
              </div>
            </div>
          </div>
    </div>
</div>

<!-- <script>
  var swiper = new Swiper('.multicolumn-review-swiper', {
    observer:true,//修改swiper自己或子元素时，自动初始化swiper
    observeParents:true,//修改swiper的父元素时，自动初始化swiper
    breakpoints: {
      320: {
        slidesPerView: 1.1,
        spaceBetween: 20,
      },
      375: {
        slidesPerView: 1.1,
        spaceBetween: 20,
      },
      640: {
        slidesPerView: 1.1,
        spaceBetween: 20,
      },
      768: {
        slidesPerView: 2.2,
        spaceBetween: 40,
      },
      1280: {
        slidesPerView: 3,
        spaceBetween: 30,
      },
      1440: {
        slidesPerView: 3,
        spaceBetween: 30,
      }
    }
  });
</script> -->

{% schema %}
{
  "name": "Multicolumn Review",
  "tag": "section",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "default": "Multicolumn",
      "label": "t:sections.multicolumn.settings.title.label"
    },
    {
      "type": "richtext",
      "id": "text",
      "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
      "label": "Text"
    },
    {
      "type": "select",
      "id": "image_width",
      "options": [
        {
          "value": "third",
          "label": "t:sections.multicolumn.settings.image_width.options__1.label"
        },
        {
          "value": "half",
          "label": "t:sections.multicolumn.settings.image_width.options__2.label"
        },
        {
          "value": "full",
          "label": "t:sections.multicolumn.settings.image_width.options__3.label"
        }
      ],
      "default": "full",
      "label": "t:sections.multicolumn.settings.image_width.label"
    },
    {
      "type": "select",
      "id": "image_ratio",
      "options": [
        {
          "value": "adapt",
          "label": "t:sections.multicolumn.settings.image_ratio.options__1.label"
        },
        {
          "value": "portrait",
          "label": "t:sections.multicolumn.settings.image_ratio.options__2.label"
        },
        {
          "value": "square",
          "label": "t:sections.multicolumn.settings.image_ratio.options__3.label"
        },
        {
          "value": "circle",
          "label": "t:sections.multicolumn.settings.image_ratio.options__4.label"
        }
      ],
      "default": "adapt",
      "label": "t:sections.multicolumn.settings.image_ratio.label"
    },
    {
      "type": "select",
      "id": "column_alignment",
      "options": [
        {
          "value": "left",
          "label": "t:sections.multicolumn.settings.column_alignment.options__1.label"
        },
        {
          "value": "center",
          "label": "t:sections.multicolumn.settings.column_alignment.options__2.label"
        }
      ],
      "default": "left",
      "label": "t:sections.multicolumn.settings.column_alignment.label"
    },
    {
      "type": "select",
      "id": "background_style",
      "options": [
        {
          "value": "none",
          "label": "t:sections.multicolumn.settings.background_style.options__1.label"
        },
        {
          "value": "primary",
          "label": "t:sections.multicolumn.settings.background_style.options__2.label"
        },
        {
          "value": "secondary",
          "label": "t:sections.multicolumn.settings.background_style.options__3.label"
        }
      ],
      "default": "primary",
      "label": "t:sections.multicolumn.settings.background_style.label"
    },
    {
      "type": "checkbox",
      "id": "swipe_on_mobile",
      "default": false,
      "label": "t:sections.multicolumn.settings.swipe_on_mobile.label"
    }
  ],
  "blocks": [
    {
      "type": "column",
      "name": "t:sections.multicolumn.blocks.column.name",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "t:sections.multicolumn.blocks.column.settings.image.label"
        },
        {
          "type": "html",
          "id": "html",
          "label": "Icon"
        },
        {
          "type": "richtext",
          "id": "text",
          "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
          "label": "t:sections.multicolumn.blocks.column.settings.text.label"
        },
        {
          "type": "richtext",
          "id": "des",
          "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
          "label": "Content"
        },
        {
          "type": "html",
          "id": "button_label",
          "default": "Button label",
          "label": "Button label1"
        },
        {
          "type": "url",
          "id": "button_link",
          "label": "button_link1"
        },
        {
          "type": "text",
          "id": "button_label2",
          "default": "Button label",
          "label": "Button label2"
        },
        {
          "type": "url",
          "id": "button_link2",
          "label": "button_link2"
        },
      {
          "type": "text",
          "id": "button_label3",
          "default": "Button label",
          "label": "Button label3"
        },
        {
          "type": "url",
          "id": "button_link3",
          "label": "button_link3"
        }
      ]
    },
    {
      "type": "column_us",
      "name": "column_us",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "t:sections.multicolumn.blocks.column.settings.image.label"
        },
        {
          "type": "html",
          "id": "html",
          "label": "Icon"
        },
        {
          "type": "richtext",
          "id": "text",
          "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
          "label": "t:sections.multicolumn.blocks.column.settings.text.label"
        },
        {
          "type": "richtext",
          "id": "des",
          "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
          "label": "Content"
        },
        {
          "type": "html",
          "id": "button_label",
          "default": "Button label",
          "label": "Button label1"
        },
        {
          "type": "url",
          "id": "button_link",
          "label": "button_link1"
        },
        {
          "type": "text",
          "id": "button_label2",
          "default": "Button label",
          "label": "Button label2"
        },
        {
          "type": "url",
          "id": "button_link2",
          "label": "button_link2"
        },
      {
          "type": "text",
          "id": "button_label3",
          "default": "Button label",
          "label": "Button label3"
        },
        {
          "type": "url",
          "id": "button_link3",
          "label": "button_link3"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Multicolumn Review",
      "blocks": [
        {
          "type": "column"
        },
        {
          "type": "column"
        },
        {
          "type": "column"
        }
      ]
    }
  ]
}
{% endschema %}
